package com.guli.mall.pms.feign;
/*
 * @Author 罗俊
 * @date 2020/12/1 - 8:48 下午
 *
 */

import com.guli.common.to.SecKillSessionAndRelation;
import com.guli.mall.pms.feign.fallBack.SecKillFeignFallBack;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 设置调用方的熔断保护
 */
@FeignClient(name = "secKill-service",fallback = SecKillFeignFallBack.class )
public interface SecKillFeignClient {

    @GetMapping("/seckill/front/checkWhetherTheProductParticipatesInTheSpike/{spuId}")
    @ApiOperation("根据spuId查询商品是否参加秒杀")
    List<SecKillSessionAndRelation> checkWhetherTheProductParticipatesInTheSpike(@PathVariable("spuId") String spuId);
}
